<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../vue@3.2.23.js"></script>
	</head>
	<body>
		<div id="app">
			<layout>
				<template v-slot:header>
					<div>header</div>
				</template>
				<template v-slot:footer>
					<div>footer</div>
				</template>
			</layout>
		</div>
	</body>
</html>
<script>
	// 具名插槽
	const app = Vue.createApp({
		data() {
			return{
				count:20
			}
		}
	});
	app.component('layout',{
		template:
		`
			<slot name="header"></slot>
			<div>content</div>
			<slot name="footer"></slot>
		`
	})
	const vm = app.mount("#app")
</script>